<!DOCTYPE html>
<%@ include file="../base.jsp"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<html>
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
        <link href="${ctx}/assets/images/favicon.ico" mce_href="images/favicon.ico" rel="shortcut icon" type="image/x-icon" />
        <title>充值</title>
        <%@ include file="../js.jsp"%>
    </head>
    <body ontouchstart>
    	<%-- <%@ include file="../top.jsp"%> --%>
        <div class="page-relative">
        	<form id="authority_form" method="post">
        		<div class="pad-20">
		            <div class="refuel-container">
		                <div class="refuel-info">
	                     	<input type="hidden" value="${member.memberId}" id="memberId" name="memberId"/>
	                      	<input type="hidden" value="${member.HQId}" id="hqId" name="hqId"/>
	                      	<input type="hidden" value="${member.HQName}" id="hqName" name="hqName"/>
	                      	<input type="hidden" value="${member.stationId}" id="stationId" name="stationId"/>
	                      	<input type="hidden" value="2" id="type" name="type"/>
		                </div>
		            </div>
	            </div>
	            <div class="bd">
	            	<div class="weui_cells_title">您正在为您在【${member.HQName}】的会员卡充值！</div>
	                <div class="weui_cells_title">您的账户余额是 <b class="text-red">${member.amount}</b> 元</div>
	                <div class="weui_cells weui_cells_form border-bottom">
		                <div class="weui_cell">
		                        <div class="weui_cell_hd"><label class="weui_label">金额 <span class="text-red">*</span></label></div>
		                        <div class="weui_cell_bd weui_cell_primary">
		                			<input class="weui_input" maxlength="8" type="number" id="memberFrozenAmount" name="memberFrozenAmount" placeholder="请输入充值金额"/>
		                        </div>
	                    </div>
                    </div>
	                <div class="weui_btn_area">
	                    <a href="javascript:;" class="weui_btn weui_btn_primary" id="fuellingSubmit">确认充值</a>
	                </div>
	            </div>
	            
	            <div class="push"></div>
			</form>
        </div>
        <%@ include file="../bottom.jsp"%>
        <script>
	        $('#fuellingSubmit').click(function() {
	            var memberFrozenAmount = $("#memberFrozenAmount").val();
				if(!memberFrozenAmount.match(/^(([1-9]\d{0,9})|0)(\.\d{1,2})?$/)){
				 	alert("请输入合法金额");  
	 				return;  
				}
				$("#authority_form").attr("action", '${ctx}/pay/prepay/').submit();
	     	});
        </script>
    </body>
</html>